<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no">
		<title>解构赋值</title>
		<script type="text/javascript">
			//字符串结构赋值
			let [a, b, c, d, e, ...f] = 'hello world'

			console.log(a) // h
			console.log(b) // e
			console.log(c) // l
			console.log(d) // l
			console.log(e) // o
			console.log(f) // [' ','w' ,'o','r','l','d']

			//获得字符串的长度
			let {
				length: size
			} = 'hello world'
			//11
			console.log(size)
		</script>
	</head>
	<body>
		<div id="app">
			<!-- todo -->
		</div>
	</body>
</html>
